﻿namespace OasisCiq.Xpil
{
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using Xnl;
    using XS;

    /// <summary>
    /// A container for defining the unique characteristics of an organisation only
    /// Note at least organisation name required
    /// </summary>
    public class OrganisationDetailsType : IValidityDateGroup, IXLink, IDataQualityGroup, ILanguageCodeGroup, IExtendedAttributes
    {
        public FreeTextLines FreeTextLines { get; set; }

        /// <summary>
        /// Note at least organisation name required
        /// </summary>
        public ICollection<OrganisationNameType> OrganisationNames { get; set; } 

        public Addresses Addresses { get; set; }

        /// <summary>
        /// A container to define the accounts details of the 
        /// party such as utility account, financil accounts
        /// </summary>
        public Accounts Accounts { get; set; }

        public ContactNumbers ContactNumbers { get; set; }

        /// <summary>
        /// A container for identification document and cards of the 
        /// party that are unique to the party. e.g. license, 
        /// identification card, credit card, etc
        /// </summary>
        public Documents Documents { get; set; }

        public ElectronicAddressIdentifiers ElectronicAddressIdentifiers { get; set; }

        public Events Events { get; set; }

        public Identifiers Identifiers { get; set; }

        /// <summary>
        /// A container for memberships of party with other organisations 
        /// (e.g. industry groups) or social networks (clubs, association, etc)
        /// </summary>
        public Memberships Memberships { get; set; }

        /// <summary>
        /// Relationships with other parties (persons or organisations, and the nature of relationship).
        /// Examples: 
        /// - For person: Contacts, blood relatives, friends, referees, customers, etc 
        /// - for Organisation: Subsidiary, Parent company, Branches, Divisions, Partners, etc
        /// </summary>
        public Relationships Relationships { get; set; }

        /// <summary>
        /// Container for income / revenue information of the 
        /// party (salary/organisation revenue)
        /// </summary>
        public Revenues Revenues { get; set; }

        public Stocks Stocks { get; set; }

        public Vehicles Vehicles { get; set; }

        public OrganisationInfo OrganisationInfo { get; set; }

        /// <summary>
        /// Type of use of this data. e.g. data exchange, contact, update, create
        /// </summary>
        public OrganisationDetailsUsageList Usage { get; set; }

        /// <summary>
        /// Status of the organisation details
        /// </summary>
        public StatusList Status { get; set; }

        /// <summary>
        /// Could be start date, issue date, validity start date, etc
        /// </summary>
        public XSDateTime DateValidFrom { get; set; }

        /// <summary>
        /// Could be end date, expiry date, validity end date, etc
        /// </summary>
        public XSDateTime DateValidTo { get; set; }

        /// <summary>
        /// A primary key to reference Organisation Details.
        /// </summary>
        public CTString OrganisationDetailsKey { get; set; }

        /// <summary>
        /// A foreign key to reference attribute Key of Organisation Details.
        /// </summary>
        public CTString OrganisationDetailsKeyRef { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public XSDateTime ValidTo { get; set; }

        /// <summary>
        /// Human Language used. e.g. "en", "en-US", "en-AUS", etc
        /// </summary>
        public XSLanguage LanguageCode { get; set; }

        public NameValueCollection ExtendedAttributes { get; set; }
    }
}
